package com.fzh.service;

import java.util.List;

import com.fzh.pojo.dto.OrderInfoLinkOrderDetailsDTO;
import com.fzh.pojo.dto.OrderInfoLinkProductAndUserDTO;
import com.fzh.pojo.entity.OrderInfo;

public interface OrderInfoService {
	
	/**
	 * 鏌ヨ鎵�鏈夌殑璁㈠崟鏁版嵁
	 * @param page
	 * @param limit
	 * @param f_uid
	 * @param f_pid
	 * @param status
	 * @return
	 */
	public List<OrderInfo> queryAllOrderInfo(Integer page,Integer limit,String f_uid,String f_pid,String status);
	
	/**
	 * 鏌ヨ璁㈠崟鎬绘潯鏁�
	 * @param f_uid
	 * @param f_pid
	 * @param status
	 * @return
	 */
	public Integer queryOrderInfoCounts(String f_uid,String f_pid,String status);

	/**
	 * 娣诲姞涓�涓鍗�
	 * @param orderInfo
	 * @return
	 */
	public Boolean addOrderInfo(OrderInfo orderInfo);

	/**
	 * 缂栬緫璁㈠崟淇℃伅鏍规嵁id
	 * @param orderInfo
	 * @return
	 */
	public Boolean editOrderInfoById(OrderInfo orderInfo);

	/**
	 * 鎵归噺鍒犻櫎璁㈠崟鏍规嵁ids
	 * @param ids
	 * @return
	 */
	public Boolean delAllOrderInfoByIds(String ids);

	/**
	 * 鏍规嵁id鍒犻櫎鍗曚釜鐨勮鍗�
	 * @param id
	 * @return
	 */
	public Boolean delOrderInfoById(Integer id);

	/**
	 * 鏍规嵁id缂栬緫璁㈠崟鐘舵��
	 * @param id
	 * @param status
	 * @return
	 */
	public Boolean editOrderInfoStatusById(Integer id, Integer status);

	/**
	 * 鏌ヨ鍑哄晢鍝佽鍗曠殑淇℃伅鏍规嵁id锛岀敤浜庢妸鏁版嵁鏄剧ず鍒拌喘鐗╄溅椤甸潰input妗嗗唴
	 * @param id
	 * @return
	 */
	public OrderInfo queryOrderInfoByIdWitchCartInput(Integer id);

	/**
	 * 鏍规嵁ids鏉ユ煡璇㈠嚭璁㈠崟鍒楄〃閲岄潰鏄惁瀛樺湪璇ュ晢鍝�,鐢ㄤ簬鍋氭壒閲忓垹闄ゆ搷浣滆繃婊�
	 * @param ids
	 * @return
	 */
	public Boolean queryAllOrderInfoByIds(String ids);

	/**
	 * 鏍规嵁id鏉ユ煡璇㈠嚭璁㈠崟鍒楄〃閲岄潰鏄惁瀛樺湪璇ュ晢鍝�,鐢ㄤ簬鍦ㄥ晢鍝佸垪琛ㄥ仛鍗曚釜鍒犻櫎鎿嶄綔杩囨护
	 * @param id
	 * @return
	 */
	public OrderInfo queryOrderInfoById(Integer id);

	/**
	 * 鏌ヨ璁㈠崟琛ㄩ噷鏁版嵁鏍规嵁ids
	 * @param ids
	 * @return
	 */
	public Boolean queryAllOrderInfoStatusByIds(String ids);

	/**
	 * 鏌ヨ鎵�鏈夌殑璁㈠崟鏍规嵁鐢ㄦ埛id锛岀敤浜庡湪鐢ㄦ埛绠＄悊椤甸潰鍒犻櫎鎿嶄綔鍋氬嚭鎻愮ず锛岀湅鐪嬭鐢ㄦ埛鏄惁鏈夎鍗曞叧鑱�
	 * @param ids
	 * @return
	 */
	public Boolean queryAllOrderInfoByF_uids(String ids);

	/**
	 * 鎵归噺鐨勮繘琛屽彂璐�
	 * @return
	 */
	public Boolean editOrderInfoStatusAllIsOne();

	/**
	 * {鍓嶅彴}鏍规嵁鍟嗗搧ids涓庣敤鎴穒d杩涜璁㈠崟鐨勬坊鍔�
	 * @param orderInfo
	 * @return
	 */
	public Boolean addOrderInfoByOrderInfos(List<OrderInfo> orderInfo);

	/**
	 * {鍓嶅彴}鏍规嵁璁㈠崟鍙锋煡璇㈠嚭鎵�鏈夌殑璁㈠崟淇℃伅
	 * @param out_trade_no
	 * @return
	 */
	public List<OrderInfo> queryOrderInfoByOrderId(String out_trade_no);

	/**
	 * {鍓嶆}鏍规嵁璁㈠崟鐨勮鍗曞彿淇敼璁㈠崟鐘舵�佷负宸蹭粯娆�
	 * @param out_trade_no
	 */
	public void editOrderInfoByOrderId(String out_trade_no);

	/**
	 * 娣诲姞璁㈠崟淇℃伅
	 * @param orderInfo
	 * @return
	 */
	public Boolean addOrderInfoByOrderInfoDTOF(OrderInfoLinkProductAndUserDTO orderInfo);
	
	public OrderInfo findOrderInfoDetails(Integer id);
	
	/**
	 * {前段}根据订单的订单号修改订单状态为待评价
	 * @param out_trade_no
	 */
	public int editOrderInfoByOrderStatus(String orderId);
	
	/**
	 * {前段}根据订单的订单号修改催单为确认收货
	 * @param out_trade_no
	 * @return 
	 */
	public int editOrderInfoByOrderStatus1(String orderId);
	
	/**
	 * {前段}根据订单号查询订单详情
	 * @param orderId
	 * @return 
	 */
	public OrderInfoLinkOrderDetailsDTO selectOrderDetailsAll(String orderId);
	
}
